<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!-- 商品添加 -->
<div class="container col-xs-3"
	style="border: 1px solid gray; height: 500px; border-radius: 8px;">
	<div style="height: 600px;">
		<!-- 添加商品 -->
		<form action="${pageContext.request.contextPath}/product/save.do" method="POST">
			<h4>添加商品</h4>
			<div class="form-group">
				<input type="text" class="form-control" name="productNum" placeholder="商品编号">
			</div>
			<div class="form-group">
				<input type="text" class="form-control" name="productName" placeholder="商品名称">
			</div>
			<div class="form-group">
				<label for="name">商品类别</label> 
				<select class="form-control" name="categoryId">
					<c:forEach items="${categoryList}" var="category">
						<option value="${category.categoryId}">${category.categoryName}</option>
					</c:forEach>
				</select>
			</div>

			<div class="form-inline">
				<div class="form-group">
					<label for="isNew">新品</label> <select class="form-control"
						name="isNew">
						<option value="1">是</option>
						<option value="0">否</option>
					</select>
				</div>
				<div class="form-group">
					<label for="isCommend">低价促销</label> <select class="form-control"
						name="isCommend" >
						<option value="1">是</option>
						<option value="0">否</option>
					</select>
				</div>
				<div class="form-group">
					<label>折扣</label> <select class="form-control"
						name="discount">
						<option value="0">0</option>
						<option value="1">1</option>
						<option value="2">2</option>
						<option value="3">3</option>
						<option value="4">4</option>
						<option value="5">5</option>
						<option value="6">6</option>
						<option value="7">7</option>
						<option value="8">8</option>
						<option value="9">9</option>
					</select>
				</div>
			</div>

			<div style="margin-top: 15px;">
				<div class="form-group col-xs-6">
					<input type="number" class="form-control" placeholder="库存"
						name="stock">
				</div>
				<div class="form-group col-xs-6">
					<input type="number" class="form-control" placeholder="单价"
						name="price">
				</div>
			</div>

			<div class="form-group">
				<label for="name">商品描述</label>
				<textarea class="form-control" rows="3" name="productDesc"></textarea>
			</div>
			<button type="submit" class="btn btn-primary center-block" >添加</button>
		</form>
	</div>
</div>